'use strict';

/**
 * @ngdoc overview
 * @name metalabOperationApp
 * @description
 * # metalabOperationApp
 *
 * Main module of the application.
 */
angular
    .module('metalabOperationApp', [
        'ngAnimate',
        'ngResource',
        'ngRoute',
        'ngSanitize',
        'ngTouch',
        'ui.router',
        'ui.select',
        'ui.bootstrap',
        'toaster',
        'meta.qnuploader',
        'froala'
    ])
    .config(function ($locationProvider) {
        $locationProvider.html5Mode(CONFIG.HTML5_MODE);
    }).run(['$rootScope', '$state', '$http', 'Passport', 'MetaResources', 'MetaRemind', '$interval', 'MetaConstants', 'MetaUtils', function($rootScope, $state, $http, Passport, MetaResources, MetaRemind, $interval, MetaConstants, MetaUtils) {

        $rootScope.CONFIG = CONFIG;
        //使用xdLocalStorage 实现sso 前端的单点登录
        $rootScope.$state = $state;
        // 后端格式规范为驼峰式
        $http.defaults.headers.common['X-Field-Style'] = 'camelcase';

        Passport.init();
        MetaUtils.initAppFunc();

}]);
